#!/usr/bin/env python
#
#   example of PyMetaInfo process usage
#

import sys
from pprint import pprint
from pyflowctrl.core4 import Packet, ProcessFlow
from pyflowctrl.core4.processes.pymetainfo1 import PyMetaInfo

if len(sys.argv) <> 2:
    print "Please specify module"
    sys.exit()
    
network =  {
    'processes': {
        'meta_extract': PyMetaInfo(),
    },
    'links': {},
}

flow = ProcessFlow()
flow.upload(network)
flow.pmap['meta_extract'].input.put(Packet(module=sys.argv[1]))
flow.run()
pprint(flow.pmap['meta_extract'].output.get().dump())

